<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      class Person {}
      let person = new Person();
      let obj = null;
      // 当属性值为null的时候无法使用typeof 和instanceof进行准确的判断
      console.log(obj instanceof Object); // false
      console.log(typeof obj); // object
      // 这样的话判断就出现错误 所以只能使用 Object.prototype.toString().call()进行判断
    </script>
  </body>
</html>
